a = int(input("Please input the an integer : "))
b = int(input("Please input the another integer : "))
x = 1
m = 1
while(x <= a and x <= b):
    if(a % x == 0 and b % x == 0):
        m = x
    x = x + 1
print(m)
